import React from 'react';
import type {BaseButtonProps} from "antd/es/button/button";

type Props = {
    element: React.ReactElement<any, string | React.JSXElementConstructor<any>>
}
const CloneElement: React.FC<Props & BaseButtonProps> = (props) => {

    return <React.Fragment>{props.element && React.cloneElement(props.element, {...props})}</React.Fragment>
};

export default React.memo(CloneElement);
